package com.archgeek.java.biz;

import com.alibaba.fastjson.JSONObject;
import com.alibaba.fastjson.serializer.SerializerFeature;

import java.io.IOException;
import java.nio.file.Files;
import java.nio.file.Paths;
import java.util.LinkedHashMap;
import java.util.List;

/**
 * @author pizhihui
 * @date 2023-10-25 17:09
 */
public class LabelMigrationConfigTest {


    public static void main(String[] args) throws IOException {

        System.out.println("xxxxxxxxxxxxxxxxxxxx");

        List<String> strings = Files.readAllLines(Paths.get("/Users/pizhihui/ProjectsIdea/code-bigdata/code-00java/src/main/resources/labelids.txt"));
        JSONObject jsonObject = new JSONObject(new LinkedHashMap<>());
        for (String string : strings) {
            jsonObject.put(string, "hadoop6new");
        }
        System.out.println(jsonObject.toString(SerializerFeature.PrettyFormat));
    }

}
